package com.rjh.concurrent.create;

import lombok.extern.slf4j.Slf4j;

import static java.lang.Thread.sleep;

@Slf4j(topic = "c.JoinTest")
public class JoinTest {

    public static void main(String[] args) throws Exception {
        log.debug("开始");
        Thread t1 = new Thread(() -> {
            log.debug("开始");
//            try {
                //sleep(1);
//            } catch (InterruptedException e) {
//                e.printStackTrace();
//            }
            log.debug("结束");
        },"t1");
        t1.start();
        t1.join();
        log.debug("结束");
    }

}
